package org.swift.commons.deployer.framework.axis2;

import java.util.Map;

import javax.xml.namespace.QName;

/**
 * This class is to allow you to get some customization out of the
 * AxisServiceFactory when it is generating an axis service containing numerous
 * operations and ways to invoke them.
 * 
 * We should look at supported custom message receivers as well based on the
 * operation.
 * 
 * @author dhesson
 */
public interface AxisOperationExposure {

	public enum HttpMethod {
		GET, POST, PUT, DELETE
	}

	/**
	 * Responsible for responding with the supported HTTP methods for a given
	 * operation type name (fully qualified operation name), as well as the
	 * relative RESTFul URL locations.
	 * 
	 * @param operationTypeName fully qualified name of the operation
	 * @return a map in which he keys in the map are the HTTPMethod, and the
	 *         values in the map are the REST location relative to the service
	 *         endpoint's URL
	 */
	public Map<HttpMethod, String> getSupportedRestMethods(
			QName operationTypeName);

	/**
	 * Allows you to supply a different soap input action for the given
	 * operation type name.
	 * 
	 * @param serviceName the name of the service being created
	 * @param operationTypeName the fully qualified name of the operation
	 * @return the soap input action for the given operation. A null response
	 *         will mean this operation is not supported via SOAP
	 */
	String getSoapInputAction(String serviceName, QName operationTypeName);

}
